package com.whynot.frame.basic.mybatis.conroller.model;



import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;

import java.util.Collection;
import java.util.Collections;

/**
 * 描述: 兼容原先fhadmin老架构的分页类
 * 作者: chenyao
 * 日期: 2018-01-30.
 * 项目名称: curtain-whynot-basic-mybatis
 * 版本: 1.0.0
 * JDK: since 1.8
 */
@Data
@ApiModel(value = "分页对象")
public class Page {

	@ApiModelProperty(value = "每页显示记录数")
	private Integer pageSize = 10; //每页显示记录数
	@ApiModelProperty(value = "每页显示记录数")
	private Integer totalPage;		//总页数
	@ApiModelProperty(value = "每页显示记录数")
	private Integer totalResult;	//总记录数
	@ApiModelProperty(value = "每页显示记录数")
	private Integer currentPage = 0;	//当前页
	private Collection rows = Collections.emptyList();

    public Page() {
    }

    public Page(int pageSize, int totalPage, int totalResult, int currentPage, Collection rows) {
		this.pageSize = pageSize;
		this.totalPage = totalPage;
		this.totalResult = totalResult;
		this.currentPage = currentPage;
		this.rows = rows;
	}
}
